Ext.define('truckplanner.model.Mission', {
    extend: 'Ext.data.Model', //'Extensible.calendar.data.EventModel',
    
    proxy : {
  		type : 'rest',
  		url : '/service/ajax/Mission',
  		reader : {
  			type : 'json',
  			root : 'items',
  			idProperty: 'id',
  			totalProperty: 'length'
  		},
  		writer : {
  			type : 'json',
  			root : 'items',
  			allowSingle : false
  		}
   },
  	
   fields: [{
	      name: 'id',
	      type: 'number'
	  }, 
	  {
	      name: 'CalendarId',
	      type: 'number'
	  },
	  {
	      name: 'Title',
	      type: 'string'
	  }, 
	  {
	      name: 'Day',
		  type: 'date',
		  dateFormat: 'Y-m-d'
	  }, 
	  {
	      name: 'StartDate',
		  type: 'date',
		  dateFormat: 'Y-m-dTH:i:s'
	  }, 
	  {
	      name: 'EndDate',
		  type: 'date',
		  dateFormat: 'Y-m-dTH:i:s'
	  }, 
	  {
	      name: 'StartLocation',
	      type: 'string'
	  }, 
	  {
	      name: 'EndLocation',
	      type: 'string'
	  },
	  {
	      name: 'TravelTime',
	      type: 'float'
	  },
	  {
	      name: 'Work',
	      type: 'string'
	  },
	  {
	      name: 'WorkTime',
	      type: 'float'
	  },
	  {
	      name: 'Hardware',
	      type: 'string'
	  },
	  {
	      name: 'Url',
	      type: 'string'
	  }, 
	  {
	      name: 'Notes',
	      type: 'string'
	  }, 
	  {
	      name: 'RecurRule',
	      type: 'string'
	  }, 
	  {
	      name: 'Location',
	      type: 'string'
	  }, 
	  {
	      name: 'Reminder',
	      type: 'string'
	  }, {
	      name: 'IsAllDay',
	      type: 'boolean'
	  }]
});